package cn.com.wxd.service.javamail;

import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import cn.com.wxd.common.file.ReadConfigFile;
import cn.com.wxd.service.sms.SmsInfo;

/**
 * Title:邮箱信息工具
 * Description:cn.com.wxd.util.service.javamail
 * <p>
 * Company: Amumu管理平台
 * Copyright: Copyright (c) 2015
 * All right reserved.
 * Created time: 2016-4-8 下午6:41:21
 *
 * @author WangXuDong
 * @version 1.0
 */
public class MailInfo {
    private static final Logger log = LoggerFactory.getLogger(SmsInfo.class);
    private static String email;
    private static transient String password;
    private static String smtp;
    private static String port;
    private static boolean isEncryp;
    private static boolean isDebug;

    static {
        init();
    }

    public static void init() {
        Map<String, String> conf = ReadConfigFile.readPropertiesConfig("wxd.javamail");
        email = conf.get("email");
        password = conf.get("password");
        smtp = conf.get("smtp");
        port = conf.get("port");
        isEncryp = Boolean.parseBoolean(conf.get("isencryp"));
        isDebug = Boolean.parseBoolean(conf.get("debug"));

    }

    public static String getEmail() {
        return email;
    }

    public static String getPassword() {
        return password;
    }

    public static String getSmtp() {
        return smtp;
    }

    public static String getPort() {
        return port;
    }

    public static boolean isEncryp() {
        return isEncryp;
    }

    public static boolean isDebug() {
        return isDebug;
    }
}
